<!DOCTYPE html>
<!--[if lt IE 7 ]><html class="ie ie6 demo-2 no-js" lang="en"> <![endif]-->
<!--[if IE 7 ]><html class="ie ie7 demo-2 no-js" lang="en"> <![endif]-->
<!--[if IE 8 ]><html class="ie ie8 demo-2 no-js" lang="en"> <![endif]-->
<!--[if (gte IE 9)|!(IE)]><!-->
<html lang="en" class="demo-2 no-js">
<!--<![endif]-->

<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<!-- Basic Page Needs
  ================================================== -->
<title>200行Go代码实现自己的区块链_睿智区块链官方网站</title>
<meta name="description" content="200行Go代码实现自己的区块链——区块生成与网络通信" />
<meta name="keywords" content="睿智区块链官方网站" />
<!-- Mobile Specific Meta
    ================================================== -->
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<!-- All Css -->
<link rel="stylesheet" type="text/css" href="../../../../../skin/css/bootstrap.css"  media="screen">
<link rel="stylesheet" type="text/css" href="../../../../../skin/css/font-awesome.min.css"  media="screen">
<link rel="stylesheet" type="text/css" href="../../../../../skin/css/icofont.css"  media="screen">
<link rel="stylesheet" type="text/css" href="../../../../../skin/css/hover-min.css"  media="screen">
<!--Owl Carousel-->
<link rel="stylesheet" type="text/css" href="../../../../../skin/css/owl.carousel.css"  media="screen">
<link rel="stylesheet" type="text/css" href="../../../../../skin/css/owl.theme.css"  media="screen">
<link rel="stylesheet" type="text/css" href="../../../../../skin/css/owl.transitions.css"  media="screen">
<!--Portfolio-->
<link rel="stylesheet" type="text/css" href="../../../../../skin/css/spsimpleportfolio.css"  media="screen">
<link rel="stylesheet" type="text/css" href="../../../../../skin/css/featherlight.min.css"  media="screen">
<link rel="stylesheet" type="text/css" href="../../../../../skin/css/style.css"  media="screen">
<link rel="stylesheet" type="text/css" href="../../../../../skin/css/responsive.css"  media="screen">
</head>

<body class="body-innerwrapper">
<!--Pre loader--> 
<div id="preloader">
  <div class="wrapper">
    <div class='circle'>
      <div class="circle-cutter"></div>
      <div class="circle-inner"></div>
    </div>
  </div>
  <footer>
    <p>睿智区块链技术版权所有</p>
  </footer>
</div>
<!--Top bar-->
<section id="topbar">
  <div class="container">
    <div class="row">
      <div class="col-sm-8 topbar-block">
        <ul>
          <li><a href="tel:400-880-3888"><i class="icofont icofont-phone"></i>400-880-3888</a> </li>
          <li><a href="mailto:3613995888@qq.com"><i class="icofont icofont-envelope"></i>3613995888@qq.com</a> </li>
          <li><a href="../../../../lianxiwomen/index.htm" ><i class="icofont icofont-social-google-map"></i>中国上海</a> </li>
        </ul>
      </div>
      <div class="col-sm-4 topbar-block text-right">
        <ul>
          <li><a href="#">中文版</a> </li>
          <li><a href="#" data-toggle="modal" data-target=".bs-modal-sm">英文版</a> </li>
        </ul>
      </div>
    </div>
  </div>
</section>
<!--Header-->
<header class="header-3">
  <nav class="navbar active" data-spy="affix" data-offset-top="1" id="slide-nav">
    <div class="container">
      <div class="navbar-header col-sm-3 col-md-3 col-xs-12">
        <button type="button" class="navbar-toggle"> <span class="sr-only">Toggle navigation</span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button>
        <a href="../../../../../index.htm"  class="menu-logo black">Q</a> </div>
      <!--Nav links-->
      <div class=" navbar-collapse col-sm-9 col-md-9" id="menu_nav"> <a href="#" class="closs"><i class="icofont icofont-close-line"></i></a>
        <ul class="nav navbar-nav">
          <li class="dropdown"> <a href="../../../../../index.htm" >网站首页</a> </li>
          <li class="dropdown"> <a href="../../../../about/index.htm" >关于我们</a>
            <ul class="dropdown-menu">
              
            </ul>
          </li><li class="dropdown"> <a href="../../../index.htm" >新闻中心</a>
            <ul class="dropdown-menu">
              
              <li><a href="../../index.htm" >公司新闻</a> </li>
              
              <li><a href="../../../chanpindongtai/index.htm" >产品动态</a> </li>
              
              <li><a href="../../../xingyezhishi/index.htm" >行业知识</a> </li>
              
            </ul>
          </li><li class="dropdown"> <a href="../../../../fuwuzhongxin/index.htm" >服务中心</a>
            <ul class="dropdown-menu">
              
            </ul>
          </li><li class="dropdown"> <a href="../../../../anni/index.htm" >案例产品</a>
            <ul class="dropdown-menu">
              
              <li><a href="../../../../anni/shouji/index.htm" >票据融资</a> </li>
              
              <li><a href="../../../../anni/websj/index.htm" >授信融资</a> </li>
              
              <li><a href="../../../../anni/pingmian/index.htm" >合同存证</a> </li>
              
            </ul>
          </li><li class="dropdown"> <a href="../../../../lianxiwomen/index.htm" >联系我们</a>
            <ul class="dropdown-menu">
              
            </ul>
          </li>
        </ul>
      </div>
      <!--/.navbar-collapse--> 
    </div>
  </nav>
</header>

<section id="breadcrumb" class="two green-color">
  <div class="container">
    <div class="row">
      <div class="col-sm-12 text-center breadcrumb-block">
        <h3>公司新闻</h3>
        <ol class="breadcrumb">
          <style>
					.breadcrumb, .breadcrumb a{ color:#FFFFFF}
					</style>
          <a href="../../../../../index.htm" >主页</a> > <a href="../../../index.htm" >新闻中心</a> > <a href="../../index.htm" >公司新闻</a> >
        </ol>
      </div>
    </div>
  </div>
</section>
<!--Portfolio-->
<section id="services" class="space-top three">
  <div class="container">
    <div class="row">
      <div class="col-sm-12 service-block text-center">
        <h3 class="animate-in move-up animated">200行Go代码实现自己的区块链</h3>
        <br>
        <div class="animate-in move-up animated" style="font-size:14px; text-align:left;"><span style="font-family: 微软雅黑, Arial; font-size: 16px; color: rgb(51, 51, 51);">在第一篇文章[1]中，我们向大家展示了如何通过精炼的Go代码实现一个简单的区块链。如何计算每个块的 Hash 值，如何验证块数据，如何让块链接起来等等，但是所有这些都是跑在一个节点上的。文章发布后，读者反响热烈，纷纷留言让我快点填坑（网络部分），于是就诞生了这第二篇文章。</span><br style="color: rgb(64, 64, 64); font-family: 微软雅黑, Arial; font-size: 16px;" />
<br style="color: rgb(64, 64, 64); font-family: 微软雅黑, Arial; font-size: 16px;" />
<span style="font-family: 微软雅黑, Arial; font-size: 16px; color: rgb(51, 51, 51);">这篇文章在之前的基础上，解决多个节点网络内，如何生成块、如何通信、如何广播消息等。</span><br style="color: rgb(64, 64, 64); font-family: 微软雅黑, Arial; font-size: 16px;" />
<br style="color: rgb(64, 64, 64); font-family: 微软雅黑, Arial; font-size: 16px;" />
<span style="font-family: 微软雅黑, Arial; font-size: 16px; color: rgb(51, 51, 51);"><strong>流程</strong></span><br style="color: rgb(64, 64, 64); font-family: 微软雅黑, Arial; font-size: 16px;" />
<p style="margin: 0px; padding: 0px; word-wrap: break-word; color: rgb(64, 64, 64); font-family: 微软雅黑, Arial; font-size: 16px; text-align: center;">
	<span style="color: rgb(51, 51, 51);"><img alt="" src="../../../../../uploads/allimg/180209/1300261919-0.jpg"  style="border: 0px; vertical-align: middle; display: block; max-width: 100%; margin: 0px auto;" /></span></p>
<p style="margin: 0px; padding: 0px; word-wrap: break-word; color: rgb(64, 64, 64); font-family: 微软雅黑, Arial; font-size: 16px;">
	<span style="color: rgb(51, 51, 51);">第一个节点创建&ldquo;创始区块&rdquo;，同时启动 TCP server并监听一个端口，等待其他节点连接。<br />
	Step 1<br />
	<br />
	启动其他节点，并与第一个节点建立TCP连接（这里我们通过不同的终端来模拟其他节点）<br />
	创建新的块<br />
	Step 2<br />
	<br />
	第一个节点验证新生成块<br />
	验证之后广播（链的新状态）给其他节点<br />
	Step 3<br />
	<br />
	所有的节点都同步了最新的链的状态<br />
	之后你可以重复上面的步骤，使得每个节点都创建TCP server并监听（不同的）端口以便其他节点来连接。通过这样的流程你将建立一个简化的模拟的（本地的）P2P网络，当然你也可以将节点的代码编译后，将二进制程序部署到云端。<br />
	<br />
	<strong><span style="font-size: 24px;">开始coding吧</span></strong></span></p>
<p style="margin: 0px; padding: 0px; word-wrap: break-word; color: rgb(64, 64, 64); font-family: 微软雅黑, Arial; font-size: 16px;">
	<br />
	<span style="color: rgb(51, 51, 51);"><strong>设置与导入依赖</strong><br />
	参考之前第一篇文章，我们使用相同的计算 hash 的函数、验证块数据的函数等。<br />
	<br />
	<strong>设置</strong><br />
	<br />
	在工程的根目录创建一个 .env 文件，并添加配置：<br />
	<br />
	ADDR=9000<br />
	<br />
	通过 go-spew 包将链数据输出到控制台，方便我们阅读：<br />
	<br />
	go get github.com/davecgh/go-spew/spew<br />
	<br />
	通过 godotenv 包来加载配置文件：<br />
	<br />
	go get github.com/joho/godotenv<br />
	<br />
	之后创建 main.go 文件。<br />
	<br />
	<strong>导入</strong><br />
	<br />
	接着我们导入所有的依赖：<br />
	<br />
	package main<br />
	<br />
	import (<br />
	&quot;bufio&quot;<br />
	&quot;crypto/sha256&quot;<br />
	&quot;encoding/hex&quot;<br />
	&quot;encoding/json&quot;<br />
	&quot;io&quot;<br />
	&quot;log&quot;<br />
	&quot;net&quot;<br />
	&quot;os&quot;<br />
	&quot;strconv&quot;<br />
	&quot;time&quot;<br />
	<br />
	&quot;github.com/davecgh/go-spew/spew&quot;<br />
	&quot;github.com/joho/godotenv&quot;<br />
	)<br />
	<strong>回顾</strong><br />
	<br />
	让我们再快速回顾下之前的重点，我们创建一个 Block 结构体，并声明一个Block 类型的 slice，Blockchain：<br />
	<br />
	// Block represents each &#39;item&#39; in the blockchain<br />
	type Block struct {<br />
	Index int<br />
	Timestamp string<br />
	BPM int<br />
	Hash string<br />
	PrevHash string<br />
	}<br />
	<br />
	// Blockchain is a series of validated Blocks<br />
	var Blockchain Block<br />
	创建块时计算hash值的函数：<br />
	<br />
	// SHA256 hashing<br />
	func calculateHash(block Block) string {<br />
	record := string(block.Index) +<br />
	block.Timestamp + string(block.BPM) + block.PrevHash<br />
	h := sha256.New<br />
	h.Write(byte(record))<br />
	hashed := h.Sum(nil)<br />
	return hex.EncodeToString(hashed)<br />
	}<br />
	创建块的函数：<br />
	<br />
	// create a new block using previous block&#39;s hash<br />
	func generateBlock(oldBlock Block, BPM int) (Block, error) {<br />
	<br />
	var newBlock Block<br />
	<br />
	t := time.Now<br />
	<br />
	newBlock.Index = oldBlock.Index + 1<br />
	newBlock.Timestamp = t.String<br />
	newBlock.BPM = BPM<br />
	newBlock.PrevHash = oldBlock.Hash<br />
	newBlock.Hash = calculateHash(newBlock)<br />
	<br />
	return newBlock, nil<br />
	}<br />
	验证块数据的函数：<br />
	<br />
	// make sure block is valid by checking index,<br />
	// and comparing the hash of the previous block<br />
	func isBlockValid(newBlock, oldBlock Block) bool {<br />
	if oldBlock.Index+1 != newBlock.Index {<br />
	return false<br />
	}<br />
	<br />
	if oldBlock.Hash != newBlock.PrevHash {<br />
	return false<br />
	}<br />
	<br />
	if calculateHash(newBlock) != newBlock.Hash {<br />
	return false<br />
	}<br />
	<br />
	return true<br />
	}<br />
	确保各个节点都以最长的链为准：<br />
	<br />
	// make sure the chain we&#39;re checking is longer than&nbsp;<br />
	// the current blockchain<br />
	func replaceChain(newBlocks []Block) {<br />
	if len(newBlocks) &gt; len(Blockchain) {<br />
	Blockchain = newBlocks<br />
	}<br />
	}<br />
	<strong>网络通信</strong><br />
	接着我们来建立各个节点间的网络，用来传递块、同步链状态等。<br />
	<br />
	我们先来声明一个全局变量 bcServer，以 channel（译者注：channel 类似其他语言中的 Queue,代码中声明的是一个 Block 数组的 channel）的形式来接受块。<br />
	<br />
	// bcServer handles incoming concurrent Blocks<br />
	var bcServer chan Block<br />
	注：Channel 是 Go 语言中很重要的特性之一，它使得我们以流的方式读写数据，特别是用于并发编程。通过这里[2]可以更深入地学习 Channel。<br />
	<br />
	接下来我们声明 main 函数，从.env加载配置，也就是端口号，然后实例化bcServer<br />
	<br />
	func main {<br />
	err := godotenv.Load<br />
	if err != nil {<br />
	log.Fatal(err)<br />
	}<br />
	<br />
	bcServer = make(chan []Block)<br />
	<br />
	// create genesis block<br />
	t := time.Now<br />
	genesisBlock := Block{0, t.String, 0, &quot;&quot;, &quot;&quot;}<br />
	spew.Dump(genesisBlock)<br />
	Blockchain = append(Blockchain, genesisBlock)<br />
	}<br />
	接着创建 TCP server 并监听端口：<br />
	<br />
	// start TCP and serve TCP server<br />
	server, err := net.Listen(&quot;tcp&quot;, &quot;:&quot;+os.Getenv(&quot;ADDR&quot;))<br />
	if err != nil {<br />
	log.Fatal(err)<br />
	}<br />
	defer server.Close<br />
	需要注意这里的 defer server.Close，它用来之后关闭链接，可以从这里[3]了解更多defer 的用法。<br />
	<br />
	for {<br />
	conn, err := server.Accept<br />
	if err != nil {<br />
	log.Fatal(err)<br />
	}<br />
	go handleConn(conn)<br />
	}<br />
	通过这个无限循环，我们可以接受其他节点的 TCP 链接，同时通过 go handleConn(conn) 启动一个新的 go routine（译者注：Rob Pike 不认为go routine 是协程，因此没有译为协程）来处理请求。<br />
	<br />
	接下来是&ldquo;处理请求&rdquo;这个重要函数，其他节点可以创建新的块并通过 TCP 连接发送出来。在这里我们依然像第一篇文章一样，以 BPM 来作为示例数据。<br />
	<br />
	客户端通过 stdin 输入 BPM<br />
	以 BPM 的值来创建块，这里会用到前面的函数：generateBlock，isBlockValid，和replaceChain<br />
	将新的链放在 channel 中，并广播到整个网络<br />
	<br />
	func handleConn(conn net.Conn) {<br />
	io.WriteString(conn, &quot;Enter a new BPM:&quot;)<br />
	<br />
	scanner := bufio.NewScanner(conn)<br />
	<br />
	// take in BPM from stdin and add it to blockchain after<br />
	// conducting necessary validation<br />
	go func {<br />
	for scanner.Scan {<br />
	bpm, err := strconv.Atoi(scanner.Text)<br />
	if err != nil {<br />
	log.Printf(&quot;%v not a number: %v&quot;, scanner.Text, err)<br />
	continue<br />
	}<br />
	newBlock, err := generateBlock(<br />
	Blockchain[len(Blockchain)-1], bpm)<br />
	if err != nil {<br />
	log.Println(err)<br />
	continue<br />
	}<br />
	if isBlockValid(newBlock, Blockchain[len(Blockchain)-1]) {<br />
	newBlockchain := append(Blockchain, newBlock)<br />
	replaceChain(newBlockchain)<br />
	}<br />
	<br />
	bcServer &lt;- Blockchain<br />
	io.WriteString(conn, &quot; Enter a new BPM:&quot;)<br />
	}<br />
	}<br />
	<br />
	defer conn.Close<br />
	}<br />
	我们创建一个 scanner，并通过 for scanner.Scan 来持续接收连接中发来的数据。为了简化，我们把 BPM 数值转化成字符串。bcServer &lt;- Blockchain 是表示我们将新的链写入 channel 中。<br />
	<br />
	通过 TCP 链接将最新的链广播出去时，我们需要：<br />
	<br />
	将数据序列化成 JSON 格式<br />
	通过 timer 来定时广播<br />
	在控制台中打印出来，方便我们查看链的最新状态<br />
	<br />
	// simulate receiving broadcast<br />
	go func {<br />
	for {<br />
	time.Sleep(30 * time.Second)<br />
	output, err := json.Marshal(Blockchain)<br />
	if err != nil {<br />
	log.Fatal(err)<br />
	}<br />
	io.WriteString(conn, string(output))<br />
	}<br />
	}<br />
	<br />
	for _ = range bcServer {<br />
	spew.Dump(Blockchain)<br />
	}<br />
	整个 handleConn 函数差不多就完成了，通过这里[4]可以获得完整的代码。<br />
	<br />
	<strong>有意思的地方</strong><br />
	现在让我们来启动整个程序，<br />
	<br />
	go run main.go<br />
	<img alt="" src="../../../../../uploads/allimg/180209/13002C925-1.jpg"  style="border: 0px; vertical-align: middle; display: block; max-width: 100%; margin: 0px auto;" /></span></p>
<p style="margin: 0px; padding: 0px; word-wrap: break-word; color: rgb(64, 64, 64); font-family: 微软雅黑, Arial; font-size: 16px;">
	<span style="color: rgb(51, 51, 51);">就像我们预期的，首先创建了&ldquo;创世块&rdquo;，接着启动了 TCP server 并监听9000端口。<br />
	<br />
	接着我们打开一个新的终端，连接到那个端口。（我们用不同颜色来区分）<br />
	<br />
	nc localhost 9000</span></p>
<div style="color: rgb(64, 64, 64); font-family: 微软雅黑, Arial; font-size: 16px; text-align: center;">
	<img alt="" src="../../../../../uploads/allimg/180209/1300261016-2.jpg"  style="border: 0px; vertical-align: middle; display: block; max-width: 100%; margin: 0px auto;" /></div>
<p style="margin: 0px; padding: 0px; word-wrap: break-word; color: rgb(64, 64, 64); font-family: 微软雅黑, Arial; font-size: 16px;">
	&nbsp;</p>
<p style="margin: 0px; padding: 0px; word-wrap: break-word; color: rgb(64, 64, 64); font-family: 微软雅黑, Arial; font-size: 16px;">
	<span style="color: rgb(51, 51, 51);">接下来我们输入一个BPM值：</span></p>
<p style="margin: 0px; padding: 0px; word-wrap: break-word; color: rgb(64, 64, 64); font-family: 微软雅黑, Arial; font-size: 16px; text-align: center;">
	<span style="color: rgb(51, 51, 51);"><img alt="" src="../../../../../uploads/allimg/180209/1300264352-3.jpg"  style="border: 0px; vertical-align: middle; display: block; max-width: 100%; margin: 0px auto;" /></span></p>
<p style="margin: 0px; padding: 0px; word-wrap: break-word; color: rgb(64, 64, 64); font-family: 微软雅黑, Arial; font-size: 16px;">
	<span style="color: rgb(51, 51, 51);"><span style="color: rgb(34, 34, 34); font-family: &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, &quot;WenQuanYi Micro Hei&quot;, &quot;Helvetica Neue&quot;, Arial, sans-serif; line-height: 28px;">接着我们从第一个终端（节点）中能看到（依据输入的BPM）创建了新的块。</span></span></p>
<p style="margin: 0px; padding: 0px; word-wrap: break-word; color: rgb(64, 64, 64); font-family: 微软雅黑, Arial; font-size: 16px; text-align: center;">
	<span style="color: rgb(51, 51, 51);"><img alt="" src="../../../../../uploads/allimg/180209/1300264917-4.jpg"  style="border: 0px; vertical-align: middle; display: block; max-width: 100%; margin: 0px auto;" /></span></p>
<p style="margin: 0px; padding: 0px; word-wrap: break-word; color: rgb(64, 64, 64); font-family: 微软雅黑, Arial; font-size: 16px;">
	<span style="color: rgb(51, 51, 51);">我们等待30秒后，可以从其他终端（节点）看到广播过来的最新的链。<br />
	<br />
	<strong>下一步</strong><br />
	到目前为止，我们为这个例子添加了简单的、本地模拟的网络能力。当然，肯定有读者觉得这不够有说服力。但本质上来说，这就是区块链的网络层。它能接受外部数据并改变内在数据的状态，又能将内在数据的最新状态广播出去。<br />
	<br />
	接下来你需要学习的是一些主流的共识算法，比如 PoW (Proof-of-Work) 和 PoS (Proof-of-Stake) 等。当然，我们会继续在后续的文章中将共识算法添加到这个例子中。<br />
	<br />
	下一篇文章再见！<br />
	<br />
	<strong>参考链接</strong><br />
	<br />
	[1] https://mp.weixin.qq.com/s?__biz=MzAwMDU1MTE1OQ==&amp;mid=2653549361&amp;idx=1&amp;sn=019f54713891cf33ef3bef3b24773a96&amp;chksm=813a62a9b64debbfdd24a8507bb974048a4456e5b0a2d5f685fb3bdf40366a25764c5df8afec&amp;scene=21<br />
	<br />
	[2] https://golangbot.com/channels/<br />
	<br />
	[3] https://blog.golang.org/defer-panic-and-recover<br />
	<br />
	[4] https://github.com/mycoralhealth/blockchain-tutorial/blob/master/networking/main.go</span></p>
</div>
      </div>
    </div>
  </div>
</section>
<!--Action 4-->
<section class="space action bg one" style=" margin-top:-100px; padding:110px 0px;">
  <div class="container">
    <div class="row">
      <div class="col-sm-8 col-sm-offset-2 text-center action-block"> </div>
    </div>
  </div>
</section>
<!--footer--> 
<footer id="footer-3" class="space">
  <div class="container">
    <div class="row">
      <div class="col-sm-3 footer-block about-text"> <a href="../../../../../index.htm"  class="menu-logo black">Q</a>
        <p>睿智区块链官方网站</p>
        <ul class="social two">
          <li><a href="#"><i class="fa fa-weixin"></i> </a> </li>
          <li><a href="#"><i class="fa fa-weibo"></i> </a> </li>
          <li><a href="#"><i class="fa fa-qq"></i> </a> </li>
          <li><a href="#"><i class="fa fa-renren"></i> </a> </li>
          <li><a href="#"><i class="icofont icofont-social-yelp"></i> </a> </li>
        </ul>
      </div>
      <div class="col-sm-3 footer-block">
        <h4>网站导航</h4>
        <ul class="important-link">
          <li><a href="../../../../../index.htm" >网站首页</a> </li>
          <li><a href="../../../../about/index.htm" >关于我们</a> </li>
          <li><a href="../../../index.htm" >新闻中心</a> </li>
          <li><a href="../../../../fuwuzhongxin/index.htm" >服务中心</a> </li>

        </ul>
      </div>
      <div class="col-sm-3 footer-block">
        <h4>友情链接</h4>
        <ul class="our-partner">
          
          <li><a href="../../../../../index.htm"  target='_blank'>区块链培训</a> </li>
          
          <li><a href="../../../../../index.htm"  target='_blank'>区块链公司</a> </li>
          
          <li><a href="../../../../../index.htm"  target='_blank'>区块链技术</a> </li>
          
          <li><a href="../../../../../index.htm"  target='_blank'>区块链服务</a> </li>
          
        </ul>
      </div>
      <div class="col-sm-3 footer-block">
        <h4>QQ邮箱订阅</h4>
        <form action="http://list.qq.com/cgi-bin/qf_compose_send" method="post">
          <div class="form-group">
            <input type="hidden" name="t" value="qf_booked_feedback">
            <input type="hidden" name="id" value="79d7181ac4d8b0144664925406fa6b1ebc29568929546ae8">
            <input type="email" class="form-control" name="mail" placeholder="请输入您的邮箱">
          </div>
          <button type="submit" class="btn radius-2x green-btn hvr-bounce-to-right">立即订阅</button>
        </form>
      </div>
    </div>
  </div>
</footer>
<!--Copyright-->
<section id="copyright" class="white">
  <div class="container">
    <div class="row">
      <div class="col-sm-12 copyright-block text-center">
        <p>地址：上海市银城中路501号上海中心大厦29楼&nbsp;&nbsp;&nbsp;睿智区块链技术&nbsp;&nbsp;&nbsp;电话：400-880-3888&nbsp;&nbsp;&nbsp;<a href="../../../../../zhangzehua/login.php-gotopage=-zhangzehua-.htm" >网站管理</a>&nbsp;&nbsp;&nbsp;<a href="#" title="张泽华：13020258881">技术支持</a></p>
      </div>
    </div>
  </div>
</section>
<!--Model--> 
 
<!--All Js--> 
<script type="text/javascript" src="../../../../js/jQuery.js" ></script>
<script type="text/javascript" src="../../../../js/jquery.easing.min.js" ></script>
<script type="text/javascript" src="../../../../js/bootstrap.js" ></script>
<!--<script src="https://use.fontawesome.com/e18447245b.js"></script>--> 
<script type="text/javascript" src="../../../../js/appear.js" ></script>
<!--Portfolio--> 
<script type="text/javascript" src="../../../../js/isotope.js" ></script>
<script type="text/javascript" src="../../../../js/spsimpleportfolio.js" ></script>
<script type="text/javascript" src="../../../../js/featherlight.min.js" ></script>
<script type="text/javascript" src="../../../../js/jquery.shuffle.modernizr.min.js" ></script>
<script type="text/javascript" src="../../../../js/steller.js" ></script>
<script type="text/javascript" src="../../../../js/smooth-scroll.js" ></script>
<script type="text/javascript" src="../../../../js/owl.carousel.js" ></script>
<script type="text/javascript" src="../../../../js/custom.js" ></script>
</body>
</html>
